При работе с большими объёмами данных Python может «тормозить», особенно при обработке сотен тысяч строк или обучении сложных ML-моделей.
🎯 Ниже — два приёма, которые позволят ускорить обучение и загрузку данных в десятки раз.
1️⃣ Используйте GPU с включённым memory growth
По умолчанию TensorFlow может попытаться занять всю память видеокарты, что приводит к ошибке OOM. Решение — включить «постепенное» выделение памяти:
gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True)
2️⃣ Оптимизируйте загрузку данных с `tf.data`
Загрузка Excel-файла — типичное узкое место (Disk I/O). Использование tf.data.Dataset с prefetch позволяет загружать и обрабатывать данные асинхронно.
Пример:
dataset = tf.data.Dataset.from_generator( data_generator, output_signature={col: tf.TensorSpec(shape=(), dtype=tf.float32) for col in data.columns} ).shuffle(1000).batch(32).prefetch(tf.data.AUTOTUNE)
📎Вывод: GPU и tf.data с правильной настройкой дают мощный прирост производительности. Особенно важно при работе с крупными ML-пайплайнами и в продакшене.
При работе с большими объёмами данных Python может «тормозить», особенно при обработке сотен тысяч строк или обучении сложных ML-моделей.
🎯 Ниже — два приёма, которые позволят ускорить обучение и загрузку данных в десятки раз.
1️⃣ Используйте GPU с включённым memory growth
По умолчанию TensorFlow может попытаться занять всю память видеокарты, что приводит к ошибке OOM. Решение — включить «постепенное» выделение памяти:
gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True)
2️⃣ Оптимизируйте загрузку данных с `tf.data`
Загрузка Excel-файла — типичное узкое место (Disk I/O). Использование tf.data.Dataset с prefetch позволяет загружать и обрабатывать данные асинхронно.
Пример:
dataset = tf.data.Dataset.from_generator( data_generator, output_signature={col: tf.TensorSpec(shape=(), dtype=tf.float32) for col in data.columns} ).shuffle(1000).batch(32).prefetch(tf.data.AUTOTUNE)
📎Вывод: GPU и tf.data с правильной настройкой дают мощный прирост производительности. Особенно важно при работе с крупными ML-пайплайнами и в продакшене.
That strategy is the acquisition of a value-priced company by a growth company. Using the growth company's higher-priced stock for the acquisition can produce outsized revenue and earnings growth. Even better is the use of cash, particularly in a growth period when financial aggressiveness is accepted and even positively viewed.he key public rationale behind this strategy is synergy - the 1+1=3 view. In many cases, synergy does occur and is valuable. However, in other cases, particularly as the strategy gains popularity, it doesn't. Joining two different organizations, workforces and cultures is a challenge. Simply putting two separate organizations together necessarily creates disruptions and conflicts that can undermine both operations.
Newly uncovered hack campaign in Telegram
The campaign, which security firm Check Point has named Rampant Kitten, comprises two main components, one for Windows and the other for Android. Rampant Kitten’s objective is to steal Telegram messages, passwords, and two-factor authentication codes sent by SMS and then also take screenshots and record sounds within earshot of an infected phone, the researchers said in a post published on Friday.
Библиотека data scientist’а | Data Science Machine learning анализ данных машинное обучение from pl